﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Inheritance
{
    public abstract class Visitor
    {
        public abstract decimal TicketPrice { get; }
    }

    public class Child : Visitor
    {

        public override decimal TicketPrice
        {
            get { return 10; }
        }
    }

    public class Adult : Visitor
    {

        public override decimal TicketPrice
        {
            get { return 20; }
        }
    }

    public class Pensioneer : Visitor
    {
        public override decimal TicketPrice
        {
            get { return 5; }
        }
    }
}
